﻿@model CultuRAM.Models.Parameter
@{
    int idP = ViewBag.IdParam;
    int pag = ViewBag.Page ?? 1;
}

<h4>Eliminar valor do Parâmetro</h4>
<br/><br/>

@using (Ajax.BeginForm("DeleteGeneric", "Parameters", new { page = pag, idParam = idP }, new AjaxOptions
{
    UpdateTargetId = "formParam",
    InsertionMode = InsertionMode.Replace,
    HttpMethod = "POST",
    OnSuccess = "UpdateListParam(" + pag + "," + idP + ")"
}))  
{
       
    @*@Html.AntiForgeryToken()*@
    @*@Html.ValidationSummary(false)*@

        @Html.HiddenFor(model => model.IdParam)

        switch (idP)
        {
            case 1:
                @Html.HiddenFor(model => model.WebpagesRole.RoleId)
                @Html.HiddenFor(model => model.WebpagesRole.RoleName)
                <div>Grupo de Utilizadores: <b> @Model.WebpagesRole.RoleName </b></div>
                <br/><br/>
                <b>ATENÇÃO!</b><br />
                <span>O registo será eliminado definitivamente. Pretende Continuar?</span>
                <br/><br />
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 2:
                @Html.HiddenFor(model => model.EventType.TypeId)
                @Html.HiddenFor(model => model.EventType.Type)
                <div>Tipo de Evento:<b> @Model.EventType.Type</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 3:
                @Html.HiddenFor(model => model.ResourceType.ResTypeId)
                @Html.HiddenFor(model => model.ResourceType.ResType)
                <div>Tipo de Recurso: <b>@Html.DisplayFor(model => model.ResourceType.ResType)</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 4:
                @Html.HiddenFor(model => model.EntityType.EntityTypeId)
                @Html.HiddenFor(model => model.EntityType.EntityTypeName)
                <div>Tipo de Entidade: <b>@Model.EntityType.EntityTypeName</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 5:
                @Html.HiddenFor(model => model.ParticipantType.ParticipTypeId)
                @Html.HiddenFor(model => model.ParticipantType.ParticipType)
                <div>Tipo de Participante: <b>@Model.ParticipantType.ParticipType</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 6:
                @Html.HiddenFor(model => model.AccreditingState.AccStateId)
                @Html.HiddenFor(model => model.AccreditingState.AccState)
                <div>Estado do Pedido de Adesão: <b>@Model.AccreditingState.AccState</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 7: 
                @Html.HiddenFor(model => model.EventState.StateId)
                @Html.HiddenFor(model => model.EventState.State)
                <div>Estado do Evento: <b>@Model.EventState.State</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 8:
                @Html.HiddenFor(model => model.City.CityId)
                @Html.HiddenFor(model => model.City.CityName)
                <div>Município: <b>@Model.City.CityName </b></div>
                <br/><br/> 
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 9:
                @Html.HiddenFor(model => model.Place.PlaceId)
                @Html.HiddenFor(model => model.Place.NamePlace)
                <div>Local:<b> @Model.Place.NamePlace</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 10:
                @Html.HiddenFor(model => model.Participant.ParticipId)
                @Html.HiddenFor(model => model.Participant.Name)
                <div>Artísta / Grupo Artístico: <b>@Model.Participant.Name</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            case 11:
                @Html.HiddenFor(model => model.EventProperty.PropertyId)
                @Html.HiddenFor(model => model.EventProperty.Name)
                <div>Propriedade do Evento: <b>@Model.EventProperty.Name</b></div>
                <br/><br/>
                <button class="btn btn-danger" value="Sim" type="submit"><i class="icon-ok icon-white"></i> Sim</button>
                @Html.Raw(@Ajax.ActionLink("replacetxt", "DefaultRight", null, new AjaxOptions()
                            {
                                UpdateTargetId = "formParam",
                                InsertionMode = InsertionMode.Replace,
                                OnSuccess = "ParamBgColorClear()",
                            }, new { @class = "btn btn-default" })
		                            .ToHtmlString().Replace("replacetxt", "<i class=\"icon-ban-circle\"></i> Não"))
                break;
            default:
                <div class="alert alert-danger"><br /><br />Sem dados... <br /><br /></div>
                break;
        } 
          
}


@Scripts.Render("~/bundles/culturam")            

